package sv.com.administrador.seguros.web.security;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.GrantedAuthorityImpl;

public class CustomGrantedAuthority extends GrantedAuthorityImpl implements GrantedAuthority {

	private static final long serialVersionUID = -4482763431560528915L;

	private boolean readOnly = true;
	private boolean allowDelete = true;
	
	public CustomGrantedAuthority(String role, boolean readOnly, boolean allowDelete) {
		super(role);
		this.readOnly = readOnly;
		this.allowDelete = allowDelete;
	}

	public boolean isReadOnly() {
		return readOnly;
	}

	public void setReadOnly(boolean readOnly) {
		this.readOnly = readOnly;
	}

	public boolean isAllowDelete() {
		return allowDelete;
	}

	public void setAllowDelete(boolean allowDelete) {
		this.allowDelete = allowDelete;
	}

}
